Translating more than one attribute at a time

The mmTranslatedValue can contain more than one valid attribute/value pair. Consider the following untranslated code:

<img <? if (dayType==weekday) then src="open.jpg" width="320" height="100" else
src="closed.jpg" width="100" height="320" ?> alt="We're open 24 hours a day from
12:01am Monday until 11:59pm Friday">

The translated markup might look like this:

<img <? if (dayType==weekday) then src="open.jpg" width="320" height="100" else
src="closed.jpg" width="100" height="320" ?>mmTranslatedValue="src=%22open.jpg%22 width=%22320%22 height=%22100%22" 
alt="We're open 24 hours a day from 12:01am Monday until 11:59pm Friday">

Notice that the spaces between the attribute/value pairs in the mmTranslatedValue are not encoded. Because Dreamweaver looks for these spaces when it attempts to render the translated value, each attribute/value pair in the mmTranslatedValue must be encoded separately and then pieced back together to form the full mmTranslatedValue. For an example of how to do this, see A simple attribute translator example.